# -*- codeing = utf-8 -*-
# @Time : 2021/3/4 21:17
# @Atuthor: 朱朱
# @File: 181tcp客户端的建立.py
# @Software: PyCharm
""
import socket

"""
"""
# 1.建立连接 sock_stream tcp连接
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

# 2.连接服务器
s.connect(('127.0.0.1', 9090))

# 3.发送消息
s.send('你好啊'.encode('gbk'))

# 4.关闭连接
s.close()